package com.schoolvisitors.dto;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalTime;

@Data
public class CreateTimeSlotDto {

//    @NotNull(message = "类型不能为空")
//    @Min(value = 0, message = "类型必须为非负数")
//    @Max(value = 255, message = "类型不能超过255")
//    private Byte type;

    @NotNull(message = "开始时间不能为空")
    @DateTimeFormat(pattern = "HH:mm:ss")
    private LocalTime startTime;

    @NotNull(message = "结束时间不能为空")
    @DateTimeFormat(pattern = "HH:mm:ss")
    private LocalTime endTime;
}
